<div class="box">
	<h3>Top 5</h3>
	
	<table cellspacing="0" cellpadding="0" border="0">
	<tr>
		<th>Player</th>
		<th>Points</th>
	</tr>
	<? foreach ($tops as $player) { ?>
	<tr onmouseover="this.className = 'over';" onmouseout="this.className = 'out';">
		<td class="player"><?php echo link_to($player->getUsername(), 'player/details?player=' . $player->getUserId()) ?></td>
		<td class="value"><?php echo $player->getPoints() ?></td>
	</tr>
	<? } ?>
	</table>
</div>

<div class="box">
	<h3>Top ratio</h3>
	
	<table cellspacing="0" cellpadding="0" border="0">
	<tr>
		<th>Player</th>
		<th>Ratio</th>
	</tr>
	<? foreach ($ratios as $player) { ?>
	<tr onmouseover="this.className = 'over';" onmouseout="this.className = 'out';">
		<td class="player"><?php echo link_to($player[1], 'player/details?player=' . $player[0]) ?></td>
		<td class="value"><?php echo round($player[2]*100); ?>%</td>
	</tr>
	<? } ?>
	</table>
</div>

<div class="box">
	<h3>Top scorer</h3>

	<table cellspacing="0" cellpadding="0" border="0">
	<tr>
		<th>Player</th>
		<th>Victories</th>
	</tr>
	<? foreach ($scorers as $player) { ?>
	<tr onmouseover="this.className = 'over';" onmouseout="this.className = 'out';">
		<td class="player"><?php echo link_to($player->getUsername(), 'player/details?player=' . $player->getUserId()) ?></td>
		<td class="value"><?php echo $player->getNbWin() ?></td>
	</tr>
	<? } ?>
	</table>
</div>

<div class="box">
	<h3>Top looser</h3>

	<table cellspacing="0" cellpadding="0" border="0">
	<tr>
		<th>Player</th>
		<th>Defeats</th>
	</tr>
	<? foreach ($loosers as $player) { ?>
	<tr onmouseover="this.className = 'over';" onmouseout="this.className = 'out';">
		<td class="player"><?php echo link_to($player->getUsername(), 'player/details?player=' . $player->getUserId()) ?></td>
		<td class="value"><?php echo $player->getNbLoss() ?></td>
	</tr>
	<? } ?>
  </table>
</div>